<template>
  <div>
    <!-- toFixed(2)表示保留两位小数 -->
    <div class="z">总价:￥{{ price.toFixed(2) }}</div>
    <div class="f" @click="zf">付款({{ numc }})</div>
  </div>
</template>

<script>
export default {
  props: {
    // 总价
    price: "",
    numc: "",
  },
  methods: {
    zf() {
      this.$emit("zf");
    },
  },
};
</script>

<style lang="less" scoped>
.z,
.f {
  user-select: none;
  display: inline-block;
  margin-top: 130px;
  margin-left: 30px;
  margin-bottom: 30px;
  width: 120px;
  height: 40px;
  font-size: 14px;
  color: #b71c1c;
  line-height: 40px;
}
.z {
  left: 60px;
  text-align: left;
}
.f {
  border: 1px solid #b71c1c;
  border-radius: 6px;
  left: 195px;
  text-align: center;
}
.f:hover {
  cursor: pointer;
  background-color: #b71c1c;
  color: #fff;
}
</style>